package com.itheima_01;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class SimpleDateFormDemo {
    public static void main(String[] args) throws ParseException {
        System.out.println("请输入您的生日:");
        Scanner sc = new Scanner(System.in);
        String birthday = sc.nextLine();
        Date date = new Date();
        long today = date.getTime();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日");
        Date parse = simpleDateFormat.parse(birthday);
        long birday = parse.getTime();
        long day = (today - birday)/(1000L*60*60*24);
        System.out.println(day);
    }
}
